﻿using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using Xcj.Mes.WholeLine.DataBase.Common;

namespace Xcj.Mes.WholeLine.DataBase.Entity
{
    public partial class LoginEntity : BaseEntity
    {
        private string _cardNo = string.Empty;
        [Alias("刷卡卡号"), StringLength(16)]
        [Column("CardNo")]
        public string CardNo { get => _cardNo; set { _cardNo = value?.Trim(); RaisePropertyChanged(); } }

        private string _userName = string.Empty;
        [Alias("用户名"), StringLength(64)]
        [Column("UserName")]
        public string UserName { get => _userName; set { _userName = value?.Trim(); RaisePropertyChanged(); } }

        private string _userID  = string.Empty;
        [Alias("用户工号"), StringLength(16)]
        [Column("UserID")]
        public string UserID { get => _userID; set { _userID = value?.Trim(); RaisePropertyChanged(); } }

        private string _password = string.Empty;
        [Alias("密码"), StringLength(32)]
        [Column("Password")]
        public string Password { get => _password; set { _password = value?.Trim(); RaisePropertyChanged(); } }

        private string _role = "操作员(PRD)";
        [Alias("权限"), StringLength(32)]
        [Column("Role")]
        public string Role { get => _role; set { _role = value?.Trim(); RaisePropertyChanged(); } }

        private string _factorySn = string.Empty;
        [Alias("工厂代号"), StringLength(32)]
        [Column("FactorySn")]
        public string FactorySn { get => _factorySn; set { _factorySn = value?.Trim(); RaisePropertyChanged(); } }

        private string _lineSn = string.Empty;
        [Alias("生产线号"), StringLength(32)]
        [Column("LineSn")]
        public string LineSn { get => _lineSn; set { _lineSn = value?.Trim(); RaisePropertyChanged(); } }

        private string _deviceSn = string.Empty;
        [Alias("机台编号"), StringLength(32)]
        [Column("DeviceSn")]
        public string DeviceSn { get => _deviceSn; set { _deviceSn = value?.Trim(); RaisePropertyChanged(); } }

        private string _moNumber = string.Empty;
        [Alias("制令单"), StringLength(32)]
        [Column("MoNumber")]
        public string MoNumber { get => _moNumber; set { _moNumber = value?.Trim(); RaisePropertyChanged(); } }

        private string _groupCode  = string.Empty;
        [Alias("工序代码"), StringLength(16)]
        [Column("GroupCode")]
        public string GroupCode { get => _groupCode; set { _groupCode = value?.Trim(); RaisePropertyChanged(); } }

        private string _groupName = string.Empty;
        [Alias("工序名称"), StringLength(16)]
        [Column("GroupName")]
        public string GroupName { get => _groupName; set { _groupName = value?.Trim(); RaisePropertyChanged(); } }

        private string _loginSession = string.Empty;
        [Alias("登录Mes会话ID"), StringLength(16)]
        [Column("LoginSession")]
        public string LoginSession { get => _loginSession; set { _loginSession = value?.Trim(); RaisePropertyChanged(); } }

        private bool _isSave = true;
        [Alias("是否保存登录信息")]
        [Column("IsSave")]
        public bool IsSave { get => _isSave; set { _isSave = value; RaisePropertyChanged(); } }

        private bool _isMesAccount = true;
        [Alias("是否Mes登录账户")]
        [Column("IsMesAccount")]
        public bool IsMesAccount { get => _isMesAccount; set { _isMesAccount = value; RaisePropertyChanged(); } }

        private string _mesUserName = string.Empty;
        [Alias("登录Mes用户姓名"), StringLength(64)]
        [Column("MesUserName")]
        public string MesUserName { get => _mesUserName; set { _mesUserName = value?.Trim(); RaisePropertyChanged(); } }

        private string _mesUserID = string.Empty;
        [Alias("登录Mes用户工号"), StringLength(16)]
        [Column("MesUserID")]
        public string MesUserID { get => _mesUserID; set { _mesUserID = value?.Trim(); RaisePropertyChanged(); } }

        private string _mesPassword = string.Empty;
        [Alias("登录Mes密码"), StringLength(32)]
        [Column("MesPassword")]
        public string MesPassword { get => _mesPassword; set { _mesPassword = value?.Trim(); RaisePropertyChanged(); } }
    }
}
